In a solid state drive (SSD), when a write request with new data is directed to the same logical address used in a previous write request, the new data is written to a different and unwritten page while original data remains as invalid data. For this reason, a large amount of invalid data remains in the physical storage space on the SSD and fills up its available capacity limit. In view of this, garbage collection is implemented to free up the physical storage space. In garbage collection, only valid data is written from its original block where free space has been depleted to a different block and data remaining in the original block is subsequently erased (flushed).
On the other hand, data written to a block may include both data of a high update frequency and data of a low update frequency. Therefore, non-updated data may be moved to a different block by the implementation of garbage collection. Because invalid data corresponding to the non-updated data does not exist, the movement of such data has no contribution to freeing up available space and is therefore said to be wasted. An increase in the number of internal writes to the SSD due to such wasted data movements leads to shortening of the life of the SSD or a slowdown in the speed of response to external access requests.
Standards on data stream control allowing appendment of attribute information (stream identifier (ID)) to data to be written to an SSD have been developed in view of the above-described problems. Upon a request to write data with a stream ID appended thereto, the SSD writes the data to a block associated with the appended stream ID amongst blocks each associated with a different stream ID. In the case of employing the standards, for example, appendment of different stream IDs to data of a high update frequency and data of a low update frequency makes garbage collection for the data of a low update frequency less likely to take place. As a result, it is possible to reduce the number of writes due to internal data movements on the SSD.
The following have been proposed as techniques for controlling writes to non-volatile memory.
For example, an information processing apparatus has been proposed, which allocates a plurality of logical address spaces to a plurality of spaces of a storage apparatus and transmits, to the storage apparatus, a command for the storage apparatus and data for identifying a space allocated to a logical address space corresponding to the command. Note that, according to the proposed information processing apparatus, each of the plurality of spaces is allocated to one or more write management areas included in the storage apparatus.
In addition, a storage controller has been proposed, which collectively rewrites data in a set of first small logical address regions having a low write frequency into an SSD and collectively rewrites remaining data in a set of second small logical address regions into the SSD. Further, a storage apparatus has been proposed, which includes a control circuit that exchanges a physical address on nonvolatile memory, corresponding to a predetermined logical address with a small number of rewrites, for a different physical address based on information about the number of rewrites for each logical address and then performs data movements according to the exchange.
Japanese Laid-open Patent Publication No. 2016-115355
International Publication Pamphlet No. WO 2014049678
International Publication Pamphlet No. WO 2006067839
In the case of appending a stream ID to data to be written to an SSD according to the update frequency of the data, as described above, there remains the following problem.
Assume, for example, that a different stream ID is assigned in advance to each of divided regions created by dividing logical storage space of the SSD. Then, assume that in transmitting, to the SSD, a write request to write data to a given divided region, a stream ID assigned to the divided region is appended to the write request to be transmitted. In this case, on the SSD, data is written to a different block according to each divided region.
Note that the update frequency of each divided region may change over time. When the update frequency of each divided region has changed, garbage collection will not bring a sufficient effect of reducing the number of writes. For example, in a situation where data in a given divided region is written to a specified block, if the update frequency of the divided region has gradually increased although it was low at the beginning, the block then includes both data of a high update frequency and data of a low update frequency. Therefore, when the block undergoes garbage collection, there is an increased possibility for valid data to be moved, which may result in increasing the number of writes on the SSD.
Note that the above-described problem is not specific to SSDs and is also seen across storage apparatuses equipped with flash memory.